#!/bin/sh
cat<<EOF
if your name == 0 then break
EOF
>/tmp/list.txt
name=10
while true
do
read -p "pls input:" name
if [ -z $name ]
then
continue
elif [ $name == "0" ]
then
break
fi
num=$((RANDOM%100))
echo $name":"$num >> /tmp/list.txt
done
cat /tmp/list.txt|sort -t":" -k2 -n -r|head -3

